<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="http://apps.bdimg.com/libs/jqueryui/1.9.2/themes/base/jquery-ui.css">
    <link rel="stylesheet" href="http://apps.bdimg.com/libs/bootstrap/3.3.4/css/bootstrap.css">
    <link rel="stylesheet" href="/css/jquery.datetimepicker.css">
    <link rel="stylesheet" href="/css/all.css">
    <title>Snake Server API Reference</title>
    <script>
        var lc_btns;
        var lc_sort_all;
        var lc_sort_time;
        var lc_sort_forward;
        var lc_sort_followers;
        var lc_sort_val;
        $(function () {
            lc_btns = $("#sort-buttons");
            lc_sort_all = $("#sort-all");
            lc_sort_time = $("#sort-time");
            lc_sort_forward = $("#sort-forward");
            lc_sort_followers = $("#sort-fans");
            lc_sort_val = $("#sort-by-val");
            initSortButtons();
        });
        function initSortButtons() {
            lc_btns.removeClass("active");
            var url = window.location.href;
            if (url.indexOf("sortby=all") > 0) {
                lc_sort_all.addClass("active"
                a
            )
                ;
                lc_sort_val.val("all");
            } else if (url.indexOf("sortby=time") > 0) {
                lc_sort_time.addClass("active");
                lc_sort_val.val("time");
            } else if (url.indexOf("sortby=forward") > 0) {
                lc_sort_forward.addClass("active");
                lc_sort_val.val("forward");
            } else if (url.indexOf("sortby=fans") > 0) {
                lc_sort_followers.addClass("active");
                lc_sort_val.val("fans");
            }
        }
    </script>
</head>
<body>
<div class="container">
    <nav class="navbar navbar-default">
        <div class="container-fluid">
            <div class="navbar-header">
                <a class="navbar-brand" href="#">
                    <img src="img/logo.jpg">
                </a>
            </div>
        </div>
    </nav>
</div>
<div class="alert alert-success text-center in" id="alert">
    <h4>执行结果</h4>
    <p id="alert-message">
    </p>
    <p>
        <button type="button" class="btn btn-success" id="alert-close">知道了</button>
    </p>
</div>
<div class="container">
    <div class="row">
        <div class="col-md-9">

            <!--上传Logo模块开始##-->
            <h4><a class="anchor" id="section-upload"></a><b>上传Logo</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/user/upload
                    </div>
                </div>
                <h5>数据类型</h5>
                <pre>
{
    "file":文件,
    "access_token":"access_token"
}
                        </pre>
                <h5>返回类型</h5>
                <p>成功后，使用:<code>http://182.92.198.51:90/img/2017-1-24/823802362907852800.jpg</code> 访问</p>
                <pre>
{
    "error":"0",
    "message":"OK",
    "data":"2017-1-24/823802362907852800.jpg"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form enctype="multipart/form-data" action="/snake/user/upload" method="POST">
                            <div class="form-group">
                                <input name="file" type="file">
                            </div>
                            <div class="form-group">
                                <input type="submit" value="upload" class="btn btn-success">
                            </div>
                            <input type="hidden" name="access_token" class="access-token" value="">
                        </form>
                    </div>
                </div>
            </div>
            <!--上传Logo模块结束@@-->




            <!--登录模块开始##-->
            <h4><a class="anchor" id="section-login"></a><b>登录</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/auth/login
                    </div>
                </div>
                <h5>数据类型</h5>
                <pre>
{
    "phone":"18588888888",
    "password":"567890"
}
                        </pre>
                <h5>返回类型</h5>
                <pre>
{
    "error":"0",
    "message":"OK",
    "data":
        {
            "access_token":"access_token"
        }
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>电话</label>
                                <input id="l-phone" type="tel" class="form-control" placeholder="电话" value="18553299771">
                            </div>
                            <div class="form-group">
                                <label>密码</label>
                                <input id="l-password" type="text" class="form-control" placeholder="密码" value="111111">
                            </div>
                            <a class="btn btn-success" id="login">登录</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--登录模块结束@@-->
            <!--<h4>更新日志</h4>-->
            <!--<div class="well">-->
                <!--<ul>-->
                    <!--<li>用户信息请求URL改变</li>-->
                <!--</ul>-->
            <!--</div>-->
            <!--注册模块开始@@-->
            <h4><a class="anchor" id="section-register"></a><b>注册</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/auth/register
                    </div>
                </div>
                <h5>数据类型</h5>
                <pre>
{
    "phone":"18588888888",
    "name" : "snake",
    "password":"567890"
}
                        </pre>
                <h5>返回类型</h5>
                <pre>
{
    "error":"0",
    "message":"OK",
    "data":
        {
            "access_token":"access_token"
        }
}
                </pre>
            </div>
            <div class="panel panel-success">
                <div class="panel-heading">测试可用性</div>
                <div class="panel-body">
                    <form class="form">
                        <div class="form-group">
                            <label>电话</label>
                            <input id="r-phone" type="tel" class="form-control" placeholder="电话" value="18553299771">
                        </div>
                        <div class="form-group">
                            <label>密码</label>
                            <input id="r-password" type="text" class="form-control" placeholder="密码" value="111111">
                        </div>
                        <div class="form-group">
                            <label>昵称</label>
                            <input id="r-name" type="text" class="form-control" placeholder="昵称" value="laodun">
                        </div>
                        <a class="btn btn-success" id="register">注册</a>
                    </form>
                </div>
            </div>
            <!--注册模块结束@@-->

            <!--用户信息模块开始##-->
            <h4><a class="anchor" id="section-info"></a><b>用户信息</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：GET(看别人)</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/user/{id}?access_token={access_token}
                    </div>
                </div>
                <h5>请求方式：GET(看自己)</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/user?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "data": {
        "id": "37eff7fb9aa411e690e9f0def16227cd",
        "name": "laodun",
        "avatar": "avatar.jpg",
        "equipment": {
            "id": "default_equipment_male",
            "name": "雄",
            "price": 0,
            "category": null,
            "logo": "default_equipment_male.jpg",
            "description": "默认装备"
        },
        "udata": {
            "id": null,
            "userId": null,
            "score": 0,
            "balance": null,
            "coin": 0
        },
        "phone": "18553299774",
        "status": null,
        "createTime": null
    },
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="i-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN" value="">
                            </div>
                            <div class="form-group">
                                <label>user_id</label>
                                <input id="i-user-id" type="text" class="form-control" placeholder="要查看用户的ID" value="">
                            </div>
                            <div class="btn-group">
                                <a class="btn btn-success" id="info">用户信息</a>
                                <a class="btn btn-default" id="my-info">自己信息</a>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
            <!--用户信息模块结束@@-->


            <!--更新用户信息模块开始##-->
            <h4><a class="anchor" id="section-update-user"></a><b>更新用户信息模块</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/user/update
                    </div>
                </div>
                <h5>数据类型<code>sex:0→男 1→女</code></h5>
                <pre>
{
    "name":"Jim",
    "sex":0
}
                        </pre>
                <h5>返回类型</h5>
                <pre>
{
    "error":"0",
    "message":"OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="update-user-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN" value="">
                            </div>
                            <div class="form-group">
                                <label>昵称</label>
                                <input id="update-user-name" type="text" class="form-control" placeholder="昵称" value="Jobs">
                            </div>
                            <div class="form-group">
                                <label>性别</label>
                                <label class="radio-inline">
                                    <input type="radio" name="update-user-sex" value="0" checked> 男
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="update-user-sex" value="1"> 女
                                </label>
                            </div>
                            <a class="btn btn-success" id="update-user">更新</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--更新用户信息模块结束@@-->


            <!--退出模块开始##-->
            <h4><a class="anchor" id="section-logout"></a><b>退出</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：GET</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/auth/logout?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "error":"0",
    "message":"OK",
    "data":
        {
            "access_token":"access_token"
        }
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="l-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN" value="">
                            </div>
                            <a class="btn btn-success" id="logout">退出登录</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--退出模块结束@@-->


            <!--修改密码模块开始##-->
            <h4><a class="anchor" id="section-update-password"></a><b>修改密码</b></h4>
            <hr>
            <div class="panel-group">
                <p class="bg-warning">修改密码后，access_token全部失效。成功返回后，跳转到登录页面。</p>
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/auth/password?access_token={access_token}
                    </div>
                </div>
                <h5>数据类型</h5>
                <pre>
{
    "old_password":"111111",
    "new_password":"222222"
}
                        </pre>
                <h5>返回类型</h5>
                <pre>
{
    "error":"0",
    "message":"OK",
    "data":
        {
            "access_token":"access_token"
        }
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="p-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN" value="" required>
                            </div>
                            <div class="form-group">
                                <label>原密码</label>
                                <input id="old-password" type="text" class="form-control" placeholder="原密码" value="111111" required>
                            </div>
                            <div class="form-group">
                                <label>新密码</label>
                                <input id="new-password" type="text" class="form-control" placeholder="新密码" value="222222" required>
                            </div>
                            <a class="btn btn-success" id="update-password">修改密码</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--修改密码模块结束@@-->


            <!--查询排行榜模块开始##-->
            <h4><a class="anchor" id="section-board"></a><b>查询排行榜</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：GET</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        <del>http://182.92.198.51:90/snake/score/board?access_token={access_token}<br></del>
                        全球榜：http://182.92.198.51:90/snake/score/gboard/{mode}?access_token={access_token}<br>
                        好友榜：http://182.92.198.51:90/snake/score/fboard/{mode}?access_token={access_token}<br>
                        好友榜：http://182.92.198.51:90/snake/score/best?access_token={access_token}<br>
                    </div>
                </div>
                <h5>数据类型<code>mode:0→限时模式 1→无尽模式</code></h5>
                <h5>返回类型(排行榜)</h5>
                <pre>
{
    "error":"0",
    "message":"OK",
    "data":
        {
            [
                    {"id":"6b94d2e997a811e690e9f0def16227cd","name":"laodun","score":999993,"avatar":""},
                    {"id":"6b94d2e997a811e690e9f0def16227cd","name":"laodun","score":999990,"avatar":""}
            ]
        }
}
                </pre>
                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="b-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN" value="" required>
                            </div>
                            <div class="form-group">
                                <label>模式</label>
                                <select id = "b-mode" class="form-control">
                                    <option value="0">限时模式</option>
                                    <option value="1">无尽模式</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>类型</label>
                                <select id = "b-type" class="form-control">
                                    <option value="0">全球排行</option>
                                    <option value="1">好友排行</option>
                                </select>
                            </div>
                            <a class="btn btn-success" id="board">查询排行榜</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--查询排行榜模块结束@@-->







            <!--查询排名模块开始##-->
            <h4><a class="anchor" id="section-ranking"></a><b>查询排名</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：GET</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        登录用户全球排名：http://182.92.198.51:90/snake/score/granking/{mode}?access_token={access_token}<br>
                        登录用户好友排名：http://182.92.198.51:90/snake/score/franking/{mode}?access_token={access_token}<br>
                    </div>
                </div>
                <h5>返回类型(排名)</h5>
                <p>
                    data字段是排名信息，从0开始计算。
                </p>
                <pre>
{
    "error":"0",
    "message":"OK",
    "data":0
}
                </pre>
                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="r-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN" value="" required>
                            </div>
                            <div class="form-group">
                                <label>模式</label>
                                <select id = "r-mode" class="form-control">
                                    <option value="0">限时模式</option>
                                    <option value="1">无尽模式</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>类型</label>
                                <select id = "r-type" class="form-control">
                                    <option value="0">全球排名</option>
                                    <option value="1">好友好友</option>
                                </select>
                            </div>
                            <a class="btn btn-success" id="ranking">查询排名</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--查询排名模块结束@@-->
















            <!--记录分数模块开始##-->
            <h4><a class="anchor" id="section-add-score"></a><b>记录分数</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/score/create?access_token={access_token}
                    </div>
                </div>
                <h5>数据类型</h5>
                <pre>
{
    "mode":0,
    "score":100,
    "attack":10,
    "length":8,
    "begin_time":"2012-02-05 09:08:04",
    "end_time":"2012-02-05 09:08:04"
}
                </pre>
                <h5>返回类型</h5>
                <pre>
{
    "error":"0",
    "message":"OK"
}
                </pre>
                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="add-score-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN" value="" required>
                            </div>
                            <div class="form-group">
                                <label>模式</label>
                                <select id="add-score-mode" class="form-control">
                                    <option value="0">无尽模式</option>
                                    <option value="1">限时模式</option>
                                    <option value="2">超神模式</option>
                                </select>
                            </div>
                            <div class="form-group">
                                <label>分数</label>
                                <input id="add-score-score" type="number" class="form-control" required value="25">
                            </div>
                            <div class="form-group">
                                <label>击杀</label>
                                <input id="add-score-attack" type="number" class="form-control" required value="10">
                            </div>
                            <div class="form-group">
                                <label>长度</label>
                                <input id="add-score-length" type="number" class="form-control" required value="8">
                            </div>
                            <div class="form-group">
                                <label>游戏开始时间</label>
                                <input id="add-score-begin-time" type="text" class="form-control" value="2016/10/29 12:20:05" required>
                            </div>
                            <div class="form-group">
                                <label>游戏结束时间</label>
                                <input id="add-score-end-time" type="text" class="form-control" value="2016/10/29 12:24:01" required>
                            </div>
                            <a class="btn btn-success" id="add-score">记录分数</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--记录分数模块结束@@-->

            <h3 class="text-warning">头套的API，是将所有皮肤的API中的skin替换成hood</h3>

            <!--购买皮肤模块开始##-->
            <h4><a class="anchor" id="section-buy-skin"></a><b>购买皮肤</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/store/skin/{skinId}/buy?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="buy-skin-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN" required>
                            </div>
                            <div class="form-group">
                                <label>皮肤ID</label>
                                <input id="buy-skin-id" type="text" class="form-control" placeholder="皮肤ID" value="101" required>
                            </div>
                            <a class="btn btn-success" id="buy-skin">购买皮肤</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--购买皮肤模块结束@@-->


            <!--更换皮肤模块开始##-->
            <h4><a class="anchor" id="section-change-skin"></a><b>更换皮肤</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/store/skin/{skinId}/change?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="change-skin-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <div class="form-group">
                                <label>皮肤ID</label>
                                <input id="change-skin-id" type="text" class="form-control" placeholder="皮肤ID" value="102" required>
                            </div>
                            <a class="btn btn-success" id="change-skin">更换皮肤</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--更换皮肤模块结束@@-->


            <!--我的皮肤模块开始##-->
            <h4><a class="anchor" id="section-my-skin"></a><b>我的皮肤</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：GET</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/skin/my?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "data": [
        {
            "id": "default_equipment_female",
            "using": true
        },
        {
            "id": "default_equipment_male",
            "using": false
        }
    ],
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="my-skin-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <a class="btn btn-success" id="my-skin">我的皮肤</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--我的皮肤模块结束@@-->


            <!--生成分享链接模块开始##-->
            <h4><a class="anchor" id="section-share"></a><b>生成分享链接</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/friend/share?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "data": "4435b02dd5d144d098603b8e226c1494",
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="share-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <a class="btn btn-success" id="share">生成分享链接</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--生成分享链接模块结束@@-->


            <!--生成分享链接模块开始##-->
            <h4><a class="anchor" id="section-click"></a><b>点击分享链接</b></h4>
            <hr>
            <div class="panel-group">
                <h5>WEB跳转到下载页面</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/friend/share/{code}
                    </div>
                </div>
                <h5>返回类型:页面跳转</h5>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>CODE</label>
                                <input id="click-code" type="text" class="form-control" required>
                                <p class="help-block">输入上个API返回的CODE，然后点击绿色按钮，再点击链接</p>
                            </div>
                            <div class="form-group">
                                <a id="click-link" target="_blank"><i class="glyphicon glyphicon-link"></i> 下载页面</a>
                            </div>
                            <a class="btn btn-success" id="click">生成可点击链接</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--生成分享链接模块结束@@-->


            <!--好友列表模块开始##-->
            <h4><a class="anchor" id="section-friend-list"></a><b>好友列表</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：GET</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/friend/list/{page}?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "data": [
        {
            "id": "2ded04719a9f11e690e9f0def16227cd",
            "name": "郭晓丽",
            "avatar": "avatar.jpg",
            "udata": null,
            "phone": "18553299772",
            "status": 0,
            "createTime": "2016-10-25"
        }
    ],
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="friend-list-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <div class="form-group">
                                <label>页码</label>
                                <input id="friend-list-page" type="number" class="form-control" placeholder="page" value="0" required>
                            </div>
                            <a class="btn btn-success" id="friend-list">好友列表</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--好友列表模块结束@@-->

            <!--添加好友模块开始##-->
            <h4><a class="anchor" id="section-friend-request"></a><b>添加好友</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/friend/{friendId}/request?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="friend-request-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <div class="form-group">
                                <label>好友ID</label>
                                <input id="friend-request-id" type="text" class="form-control" placeholder="ID" required>
                            </div>
                            <a class="btn btn-success" id="friend-request">添加好友</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--添加好友模块结束@@-->

            <!--接收好友模块开始##-->
            <h4><a class="anchor" id="section-friend-accept"></a><b>接收好友请求</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/friend/{friendId}/accept?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="friend-accept-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <div class="form-group">
                                <label>好友ID</label>
                                <input id="friend-accept-id" type="text" class="form-control" placeholder="ID" required>
                            </div>
                            <a class="btn btn-success" id="friend-accept">接收好友请求</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--添加好友模块结束@@-->


            <!--删除好友模块开始##-->
            <h4><a class="anchor" id="section-friend-remove"></a><b>删除好友</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/friend/{friendId}/remove?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="friend-remove-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <div class="form-group">
                                <label>好友ID</label>
                                <input id="friend-remove-id" type="text" class="form-control" placeholder="ID" required>
                            </div>
                            <a class="btn btn-success" id="friend-remove">删除好友</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--添删除好友模块结束@@-->


            <!--消息列表模块开始##-->
            <h4><a class="anchor" id="section-message-list"></a><b>消息列表</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/message/list/{page}?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "data": [
        {
            "id": "2bb0279e151941828574f77506533293",
            "sender": "u0",
            "content": "郭晓丽接收了你的好友请求",
            "dateCreated": 1477979933000,
            "deleted": false
        }
    ],
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="message-list-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <div class="form-group">
                                <label>页码</label>
                                <input id="message-list-page" type="number" class="form-control" placeholder="page" required>
                            </div>
                            <a class="btn btn-success" id="message-list">消息列表</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--添删除好友模块结束@@-->


            <!--设为已读模块开始##-->
            <h4><a class="anchor" id="section-message-read"></a><b>设为已读</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/message/{messageId}/read?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="message-read-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <div class="form-group">
                                <label>消息ID</label>
                                <input id="message-read-id" type="text" class="form-control" placeholder="text" required>
                            </div>
                            <a class="btn btn-success" id="message-read">消息设为已读</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--设为已读模块结束@@-->

            <!--设为未读模块开始##-->
            <h4><a class="anchor" id="section-message-unread"></a><b>设为未读</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/message/{messageId}/unread?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="message-unread-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <div class="form-group">
                                <label>消息ID</label>
                                <input id="message-unread-id" type="text" class="form-control" placeholder="ID" required>
                            </div>
                            <a class="btn btn-success" id="message-unread">消息设为未读</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--设为未读模块结束@@-->


            <!--删除消息模块开始##-->
            <h4><a class="anchor" id="section-message-delete"></a><b>删除消息</b></h4>
            <hr>
            <div class="panel-group">
                <h5>请求方式：POST</h5>
                <div class="panel panel-default">
                    <div class="panel-body">
                        http://182.92.198.51:90/snake/message/{messageId}/delete?access_token={access_token}
                    </div>
                </div>
                <h5>返回类型</h5>
                <pre>
{
    "error": 0,
    "message": "OK"
}
                </pre>

                <div class="panel panel-success">
                    <div class="panel-heading">测试可用性</div>
                    <div class="panel-body">
                        <form class="form">
                            <div class="form-group">
                                <label>ACCESS_TOKEN</label>
                                <input id="message-delete-access-token" type="text" class="form-control access-token" placeholder="ACCESS_TOKEN"  required>
                            </div>
                            <div class="form-group">
                                <label>消息ID</label>
                                <input id="message-delete-id" type="text" class="form-control" placeholder="ID" required>
                            </div>
                            <a class="btn btn-success" id="message-delete">删除消息</a>
                        </form>
                    </div>
                </div>
            </div>
            <!--删除消息模块结束@@-->



            <div class="panel panel-default">
                <div class="panel-heading">错误代码</div>
                <table class="table">
                    <thead>
                        <th>#</th>

                        <th>code</th>
                        <th>message</th>
                    </thead>
                    <tbody>
                    <tr><td>1</td><td>0</td><td>OK</td></tr><tr><td>2</td><td>1000</td><td>插入失败</td></tr><tr><td>3</td><td>1100</td><td>更新失败</td></tr><tr><td>4</td><td>1200</td><td>删除失败</td></tr><tr><td>5</td><td>1300</td><td>查询失败</td></tr><tr><td>6</td><td>2000</td><td>系统错误</td></tr><tr><td>7</td><td>3000</td><td>Token验证非法</td></tr><tr><td>8</td><td>4000</td><td>无效用户</td></tr><tr><td>9</td><td>4100</td><td>电话已经被注册</td></tr><tr><td>10</td><td>4200</td><td>用户名或密码错误</td></tr><tr><td>11</td><td>4300</td><td>密码错误</td></tr><tr><td>12</td><td>5000</td><td>购买失败</td></tr><tr><td>13</td><td>5001</td><td>金币不足</td></tr><tr><td>14</td><td>5002</td><td>库存不足</td></tr><tr><td>15</td><td>5003</td><td>装备不存在</td></tr><tr><td>16</td><td>5004</td><td>用户未购买此设备</td></tr><tr><td>17</td><td>9000</td><td>参数错误</td></tr>
                    </tbody>
                </table>
            </div>

        </div>
        <div class="col-md-3">
            <ul class="nav nav-stacked nav-slide">
                <!--认证-->
                <li class="active"><a href="#section-register">注册  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-login">登录  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-logout">退出登录  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-update-password">修改密码  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li class="divider"></li>
                <!--用户-->
                <li ><a href="#section-info">用户信息  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-update-user">修改信息  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-upload">上传头像  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li class="divider"></li>
                <!--分数-->
                <li ><a href="#section-board">排行榜  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-ranking">排名  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-add-score">记录分数  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li class="divider"></li>
                <!--装备-->
                <li ><a href="#section-buy-skin">购买皮肤  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-change-skin">更换皮肤  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-my-skin">我的皮肤  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li class="divider"></li>


                <!--SNS-->
                <li ><a href="#section-share">生成分享链接  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-click">点击分享链接  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-friend-list">好友列表  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-friend-request">添加好友  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-friend-accept">接收好友请求  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-friend-remove">删除好友  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li class="divider"></li>

                <!--消息-->
                <li ><a href="#section-message-list">消息列表  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-message-read">设为已读  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-message-unread">设为已读  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li ><a href="#section-message-delete">删除消息  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li class="divider"></li>

                <!--共通-->
                <li ><a href="#section-code">错误代码  <i class="glyphicon glyphicon-ok text-success pull-right"></i></a></li>
                <li class="divider"></li>

                <!--后台-->
                <li ><a href="#section-">皮肤列表</a></li>
                <li ><a href="#section-">皮肤添加</a></li>
                <li ><a href="#section-">皮肤修改</a></li>
                <li ><a href="#section-">皮肤删除</a></li>
                <li class="divider"></li>

                <li ><a href="#section-">用户列表</a></li>

                <li class="divider"></li>
                <li ><a href="javascript:;" id="temp-clear-order">删除所有订单</a></li>
                <li ><a href="javascript:;" id="search">search</a></li>

            </ul>
        </div>
    </div>
</div>
</body>

<script src="http://apps.bdimg.com/libs/html5shiv/3.7/html5shiv.min.js"></script>
<script src="http://apps.bdimg.com/libs/respond.js/1.4.2/respond.js"></script>
<script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="http://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="http://apps.bdimg.com/libs/jquery.cookie/1.4.1/jquery.cookie.js"></script>
<script src="http://apps.bdimg.com/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>

<script src="/js/jquery.datetimepicker.full.min.js" type="text/javascript"></script>
<script src="/js/handler.js?version=5" type="text/javascript"></script>
<script type="text/javascript">

    $(function () {



        handler.register.init();
        handler.login.init();
        handler.info.init();
        handler.updateUser.init();
        handler.logout.init();
        handler.password.init();
        handler.board.init();
        handler.ranking.init();
        handler.addScore.init();
        handler.buySkin.init();
        handler.changeSkin.init();
        handler.mySkin.init();
        handler.share.init();
        handler.click.init();
        handler.friendList.init();
        handler.friendRequest.init();
        handler.friendAccept.init();
        handler.friendRemove.init();
        handler.messageList.init();
        handler.messageRead.init();
        handler.messageUnRead.init();



        handler.tempClearOrder.init();


        handler.search.init();
        handler.alert.init();
        handler.test.init();

        /**
         * TODO: 需要增加的API
         * 1、购买
         * 2、头套商店
         * 3、使用、不使用头套
         * 3、积分全球排行榜10，前200，    好友显示10个 分页
         * 4、
         */

    })
</script>
</html>